package
{
	import flash.display.Sprite;
	import flash.net.FileReference;
	
	public class mask_Example extends Sprite
	{
		import flash.text.TextField;
import flash.display.Sprite;
import flash.events.MouseEvent;
var square:Sprite = new Sprite();
var file:FileReference  = new FileReference();
		public function mask_Example()
		{
var tf:TextField = new TextField();
tf.text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, " 
            + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
tf.selectable = false;
tf.wordWrap = true;
tf.width = 150;
addChild(tf);

square.graphics.beginFill(0x000000);
square.graphics.drawRect(10, 10, 80, 80);
addChild(square);

tf.mask = square;

tf.addEventListener(MouseEvent.MOUSE_DOWN, drag);
tf.addEventListener(MouseEvent.MOUSE_UP, noDrag);
		}

function drag(event:MouseEvent):void {
    square.startDrag();
}
function noDrag(event:MouseEvent):void {
    square.stopDrag();
}

	}
}